package com.funtl.screw.admin.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.funtl.screw.admin.dto.SysOauthClientDetailsDTO;
import com.funtl.screw.admin.entity.SysOauthClientDetails;
import com.funtl.screw.common.core.util.QueryRequest;
import com.funtl.screw.common.core.util.ResponseResult;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author Lusifer
 * @since 2018-05-15
 */
public interface SysOauthClientDetailsService extends IService<SysOauthClientDetails> {

    /**
     * 通过ID删除客户端
     */
    Boolean removeByClientId(String clientId);

    /**
     * 根据客户端信息
     */
    Boolean updateClientById(SysOauthClientDetailsDTO clientDetailsDTO);

    /**
     * 添加客户端
     */
    Boolean saveClient(SysOauthClientDetailsDTO clientDetailsDTO);

    /**
     * 分页查询客户端信息
     */
    Page<SysOauthClientDetailsDTO> queryPage(QueryRequest queryRequest, SysOauthClientDetails query);

    /**
     * 同步缓存 （清空缓存）
     *
     * @return R
     */
    ResponseResult<Void> syncClientCache();
}
